home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVMASYNC.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  56 lines

  1. /*=======================================================*/
  2. /*  TVMASYNC.C                                           */
  3. /*                                                       */
  4. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  5. /*  May be freely copied for noncommercial use, so long  */
  6. /*  as this copyright notice remains intact, and any     */
  7. /*  changes are marked in the comment blocks preceding   */
  8. /*  functions.                                           */
  9. /*=======================================================*/
  10.  
  11. #include "tvapi.h"
  12. #include "tvstream.h"
  13.  
  14. /*=======================================================*/
  15. /* TVwin_async  set asynchronous notification function   */
  16. /*   Ralf Brown 4/4/88                                   */
  17. /*=======================================================*/
  18.  
  19. void pascal TVwin_async(OBJECT win,void far (*func)())
  20. {
  21.    static BYTE stream[] = { S_MANAGER(10), MS_PRIM_ASYNC, 0,0,0,0,
  22.                                            MS_SEC_ASYNC, 0,0,0,0 } ;
  23.  
  24.    *((unsigned far **)(stream+5)) = (unsigned far *) _TVnotify_handler ;
  25.    *((unsigned far **)(stream+10)) = (unsigned far *) func ;
  26.    TVwin_stream(win,stream) ;
  27. }
  28.  
  29. /*=======================================================*/
  30. /* TVwin_notify  enable notification of specific event   */
  31. /*   Ralf Brown 4/4/88                                   */
  32. /*=======================================================*/
  33.  
  34. void pascal TVwin_notify(OBJECT win,int event)
  35. {
  36.    static BYTE stream[] = { S_MANAGER(1), 0 } ;
  37.  
  38.    stream[4] = event | MS_NOTIFY ;
  39.    TVwin_stream(win,stream) ;
  40. }
  41.  
  42. /*=======================================================*/
  43. /* TVwin_cancel  cancel notification of specific event   */
  44. /*   Ralf Brown 4/4/88                                   */
  45. /*=======================================================*/
  46.  
  47. void pascal TVwin_cancel(OBJECT win,int event)
  48. {
  49.    static BYTE stream[] = { S_MANAGER(1), 0 } ;
  50.  
  51.    stream[4] = event | MS_NONOTIFY ;
  52.    TVwin_stream(win,stream) ;
  53. }
  54.  
  55. /* End of TVMASYNC.C */
  56.